home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 January: Mac OS SDK / Dev.CD Jan 00 SDK1.toast / Development Kits / Mac OS / QuickTime / QuickTime 3 Interfaces & Libs / QTDevWin / CIncludes / Quickdraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-21  |  64.8 KB  |  2,006 lines  |  [TEXT/dosa]

  1. /*
  2.      File:        Quickdraw.h
  3.  
  4.      Contains:    Interface to Quickdraw Graphics
  5.  
  6.      Version:    Technology:    Mac OS 8.1
  7.                  Release:    QuickTime 3.0
  8.  
  9.      Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __QUICKDRAW__
  19. #define __QUICKDRAW__
  20.  
  21. #ifndef __MACTYPES__
  22. #include <MacTypes.h>
  23. #endif
  24. #ifndef __MIXEDMODE__
  25. #include <MixedMode.h>
  26. #endif
  27. #ifndef __QUICKDRAWTEXT__
  28. #include <QuickdrawText.h>
  29. #endif
  30.  
  31.  
  32.  
  33. #if PRAGMA_ONCE
  34. #pragma once
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT
  42. #pragma import on
  43. #endif
  44.  
  45. #if PRAGMA_STRUCT_ALIGN
  46.     #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48.     #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50.     #pragma pack(2)
  51. #endif
  52.  
  53.  
  54. enum {
  55.     invalColReq                    = -1                            /*invalid color table request*/
  56. };
  57.  
  58.  
  59. enum {
  60.                                                                 /* transfer modes */
  61.     srcCopy                        = 0,                            /*the 16 transfer modes*/
  62.     srcOr                        = 1,
  63.     srcXor                        = 2,
  64.     srcBic                        = 3,
  65.     notSrcCopy                    = 4,
  66.     notSrcOr                    = 5,
  67.     notSrcXor                    = 6,
  68.     notSrcBic                    = 7,
  69.     patCopy                        = 8,
  70.     patOr                        = 9,
  71.     patXor                        = 10,
  72.     patBic                        = 11,
  73.     notPatCopy                    = 12,
  74.     notPatOr                    = 13,
  75.     notPatXor                    = 14,
  76.     notPatBic                    = 15,                            /* Special Text Transfer Mode */
  77.     grayishTextOr                = 49,
  78.     hilitetransfermode            = 50,
  79.     hilite                        = 50,                            /* Arithmetic transfer modes */
  80.     blend                        = 32,
  81.     addPin                        = 33,
  82.     addOver                        = 34,
  83.     subPin                        = 35,
  84.     addMax                        = 37,
  85.     adMax                        = 37,
  86.     subOver                        = 38,
  87.     adMin                        = 39,
  88.     ditherCopy                    = 64,                            /* Transparent mode constant */
  89.     transparent                    = 36
  90. };
  91.  
  92.  
  93. enum {
  94.     italicBit                    = 1,
  95.     ulineBit                    = 2,
  96.     outlineBit                    = 3,
  97.     shadowBit                    = 4,
  98.     condenseBit                    = 5,
  99.     extendBit                    = 6
  100. };
  101.  
  102.  
  103. enum {
  104.                                                                 /* QuickDraw color separation constants */
  105.     normalBit                    = 0,                            /*normal screen mapping*/
  106.     inverseBit                    = 1,                            /*inverse screen mapping*/
  107.     redBit                        = 4,                            /*RGB additive mapping*/
  108.     greenBit                    = 3,
  109.     blueBit                        = 2,
  110.     cyanBit                        = 8,                            /*CMYBk subtractive mapping*/
  111.     magentaBit                    = 7,
  112.     yellowBit                    = 6,
  113.     blackBit                    = 5
  114. };
  115.  
  116.  
  117. enum {
  118.     blackColor                    = 33,                            /*colors expressed in these mappings*/
  119.     whiteColor                    = 30,
  120.     redColor                    = 205,
  121.     greenColor                    = 341,
  122.     blueColor                    = 409,
  123.     cyanColor                    = 273,
  124.     magentaColor                = 137,
  125.     yellowColor                    = 69
  126. };
  127.  
  128.  
  129. enum {
  130.     picLParen                    = 0,                            /*standard picture comments*/
  131.     picRParen                    = 1,
  132.     clutType                    = 0,                            /*0 if lookup table*/
  133.     fixedType                    = 1,                            /*1 if fixed table*/
  134.     directType                    = 2,                            /*2 if direct values*/
  135.     gdDevType                    = 0                                /*0 = monochrome 1 = color*/
  136. };
  137.  
  138.  
  139. enum {
  140.     interlacedDevice            = 2,                            /* 1 if single pixel lines look bad */
  141.     roundedDevice                = 5,                            /* 1 if device has been “rounded” into the GrayRgn */
  142.     hasAuxMenuBar                = 6,                            /* 1 if device has an aux menu bar on it */
  143.     burstDevice                    = 7,
  144.     ext32Device                    = 8,
  145.     ramInit                        = 10,                            /*1 if initialized from 'scrn' resource*/
  146.     mainScreen                    = 11,                            /* 1 if main screen */
  147.     allInit                        = 12,                            /* 1 if all devices initialized */
  148.     screenDevice                = 13,                            /*1 if screen device [not used]*/
  149.     noDriver                    = 14,                            /* 1 if no driver for this GDevice */
  150.     screenActive                = 15,                            /*1 if in use*/
  151.     hiliteBit                    = 7,                            /*flag bit in HiliteMode (lowMem flag)*/
  152.     pHiliteBit                    = 0,                            /*flag bit in HiliteMode used with BitClr procedure*/
  153.     defQDColors                    = 127,                            /*resource ID of clut for default QDColors*/
  154.                                                                 /* pixel type */
  155.     RGBDirect                    = 16,                            /* 16 & 32 bits/pixel pixelType value */
  156.                                                                 /* pmVersion values */
  157.     baseAddr32                    = 4                                /*pixmap base address is 32-bit address*/
  158. };
  159.  
  160.  
  161.  
  162. enum {
  163.     sysPatListID                = 0,
  164.     iBeamCursor                    = 1,
  165.     crossCursor                    = 2,
  166.     plusCursor                    = 3,
  167.     watchCursor                    = 4
  168. };
  169.  
  170.  
  171. enum {
  172.     kQDGrafVerbFrame            = 0,
  173.     kQDGrafVerbPaint            = 1,
  174.     kQDGrafVerbErase            = 2,
  175.     kQDGrafVerbInvert            = 3,
  176.     kQDGrafVerbFill                = 4
  177. };
  178.  
  179. #if OLDROUTINENAMES
  180.  
  181. enum {
  182.     frame                        = kQDGrafVerbFrame,
  183.     paint                        = kQDGrafVerbPaint,
  184.     erase                        = kQDGrafVerbErase,
  185.     invert                        = kQDGrafVerbInvert,
  186.     fill                        = kQDGrafVerbFill
  187. };
  188.  
  189. #endif  /* OLDROUTINENAMES */
  190.  
  191. typedef SInt8                             GrafVerb;
  192.  
  193. enum {
  194.     chunky                        = 0,
  195.     chunkyPlanar                = 1,
  196.     planar                        = 2
  197. };
  198.  
  199. typedef SInt8                             PixelType;
  200. typedef short                             Bits16[16];
  201.  
  202. /***************   IMPORTANT NOTE REGARDING Pattern  **************************************
  203.    Patterns were originally defined as:
  204.    
  205.         C:             typedef unsigned char Pattern[8];
  206.         Pascal:        Pattern = PACKED ARRAY [0..7] OF 0..255;
  207.         
  208.    The old array definition of Pattern would cause 68000 based CPU's to crash in certain circum-
  209.    stances. The new struct definition is safe, but may require source code changes to compile.
  210.     
  211. *********************************************************************************************/
  212.  
  213. struct Pattern {
  214.     UInt8                             pat[8];
  215. };
  216. typedef struct Pattern                    Pattern;
  217. /*
  218.  ConstPatternParam is no longer needed.  It was first created when Pattern was an array.
  219.  Now that Pattern is a struct, it is more straight forward to just add the "const" qualifier
  220.  on the parameter type (e.g. "const Pattern * pat" instead of "ConstPatternParam pat").
  221. */
  222.  
  223. typedef const Pattern *                    ConstPatternParam;
  224. typedef Pattern *                        PatPtr;
  225. typedef PatPtr *                        PatHandle;
  226. typedef SignedByte                         QDByte;
  227. typedef QDByte *                        QDPtr;
  228. typedef QDPtr *                            QDHandle;
  229. typedef short                             QDErr;
  230.  
  231. enum {
  232.     singleDevicesBit            = 0,
  233.     dontMatchSeedsBit            = 1,
  234.     allDevicesBit                = 2
  235. };
  236.  
  237.  
  238. enum {
  239.     singleDevices                = 1 << singleDevicesBit,
  240.     dontMatchSeeds                = 1 << dontMatchSeedsBit,
  241.     allDevices                    = 1 << allDevicesBit
  242. };
  243.  
  244. typedef unsigned long                     DeviceLoopFlags;
  245.  
  246. struct BitMap {
  247.     Ptr                             baseAddr;
  248.     short                             rowBytes;
  249.     Rect                             bounds;
  250. };
  251. typedef struct BitMap                    BitMap;
  252. typedef BitMap *                        BitMapPtr;
  253. typedef BitMapPtr *                        BitMapHandle;
  254.  
  255. struct Cursor {
  256.     Bits16                             data;
  257.     Bits16                             mask;
  258.     Point                             hotSpot;
  259. };
  260. typedef struct Cursor                    Cursor;
  261.  
  262. typedef Cursor *                        CursPtr;
  263. typedef CursPtr *                        CursHandle;
  264.  
  265. struct PenState {
  266.     Point                             pnLoc;
  267.     Point                             pnSize;
  268.     short                             pnMode;
  269.     Pattern                         pnPat;
  270. };
  271. typedef struct PenState                    PenState;
  272.  
  273. struct MacRegion {
  274.     unsigned short                     rgnSize;                    /*size in bytes*/
  275.     Rect                             rgnBBox;                    /*enclosing rectangle*/
  276. };
  277. typedef struct MacRegion                MacRegion;
  278. /*
  279.     The type name "Region" has a name space collision on Win32.
  280.     Use MacRegion to be cross-platfrom safe.
  281. */
  282. #if TARGET_OS_MAC
  283.  
  284. typedef MacRegion                         Region;
  285. #endif  /* TARGET_OS_MAC */
  286.  
  287. typedef MacRegion *                        RgnPtr;
  288. typedef RgnPtr *                        RgnHandle;
  289.  
  290. struct Picture {
  291.     short                             picSize;
  292.     Rect                             picFrame;
  293. };
  294. typedef struct Picture                    Picture;
  295.  
  296. typedef Picture *                        PicPtr;
  297. typedef PicPtr *                        PicHandle;
  298.  
  299. struct MacPolygon {
  300.     short                             polySize;
  301.     Rect                             polyBBox;
  302.     Point                             polyPoints[1];
  303. };
  304. typedef struct MacPolygon                MacPolygon;
  305. /*
  306.     The type name "Polygon" has a name space collision on Win32.
  307.     Use MacPolygon to be cross-platfrom safe.
  308. */
  309. #if TARGET_OS_MAC
  310.  
  311. typedef MacPolygon                         Polygon;
  312. #endif  /* TARGET_OS_MAC */
  313.  
  314. typedef MacPolygon *                    PolyPtr;
  315. typedef PolyPtr *                        PolyHandle;
  316. typedef CALLBACK_API( void , QDTextProcPtr )(short byteCount, Ptr textBuf, Point numer, Point denom);
  317. typedef CALLBACK_API( void , QDLineProcPtr )(Point newPt);
  318. typedef CALLBACK_API( void , QDRectProcPtr )(GrafVerb verb, Rect *r);
  319. typedef CALLBACK_API( void , QDRRectProcPtr )(GrafVerb verb, Rect *r, short ovalWidth, short ovalHeight);
  320. typedef CALLBACK_API( void , QDOvalProcPtr )(GrafVerb verb, Rect *r);
  321. typedef CALLBACK_API( void , QDArcProcPtr )(GrafVerb verb, Rect *r, short startAngle, short arcAngle);
  322. typedef CALLBACK_API( void , QDPolyProcPtr )(GrafVerb verb, PolyHandle poly);
  323. typedef CALLBACK_API( void , QDRgnProcPtr )(GrafVerb verb, RgnHandle rgn);
  324. typedef CALLBACK_API( void , QDBitsProcPtr )(BitMap *srcBits, Rect *srcRect, Rect *dstRect, short mode, RgnHandle maskRgn);
  325. typedef CALLBACK_API( void , QDCommentProcPtr )(short kind, short dataSize, Handle dataHandle);
  326. typedef CALLBACK_API( short , QDTxMeasProcPtr )(short byteCount, Ptr textAddr, Point *numer, Point *denom, FontInfo *info);
  327. typedef CALLBACK_API( void , QDGetPicProcPtr )(Ptr dataPtr, short byteCount);
  328. typedef CALLBACK_API( void , QDPutPicProcPtr )(Ptr dataPtr, short byteCount);
  329. typedef CALLBACK_API( void , QDOpcodeProcPtr )(Rect *fromRect, Rect *toRect, short opcode, short version);
  330. typedef CALLBACK_API_C( OSStatus , QDStdGlyphsProcPtr )(void *dataStream, ByteCount size);
  331. typedef CALLBACK_API( void , QDJShieldCursorProcPtr )(short left, short top, short right, short bottom);
  332. typedef STACK_UPP_TYPE(QDTextProcPtr)                             QDTextUPP;
  333. typedef STACK_UPP_TYPE(QDLineProcPtr)                             QDLineUPP;
  334. typedef STACK_UPP_TYPE(QDRectProcPtr)                             QDRectUPP;
  335. typedef STACK_UPP_TYPE(QDRRectProcPtr)                             QDRRectUPP;
  336. typedef STACK_UPP_TYPE(QDOvalProcPtr)                             QDOvalUPP;
  337. typedef STACK_UPP_TYPE(QDArcProcPtr)                             QDArcUPP;
  338. typedef STACK_UPP_TYPE(QDPolyProcPtr)                             QDPolyUPP;
  339. typedef STACK_UPP_TYPE(QDRgnProcPtr)                             QDRgnUPP;
  340. typedef STACK_UPP_TYPE(QDBitsProcPtr)                             QDBitsUPP;
  341. typedef STACK_UPP_TYPE(QDCommentProcPtr)                         QDCommentUPP;
  342. typedef STACK_UPP_TYPE(QDTxMeasProcPtr)                         QDTxMeasUPP;
  343. typedef STACK_UPP_TYPE(QDGetPicProcPtr)                         QDGetPicUPP;
  344. typedef STACK_UPP_TYPE(QDPutPicProcPtr)                         QDPutPicUPP;
  345. typedef STACK_UPP_TYPE(QDOpcodeProcPtr)                         QDOpcodeUPP;
  346. typedef STACK_UPP_TYPE(QDStdGlyphsProcPtr)                         QDStdGlyphsUPP;
  347. typedef STACK_UPP_TYPE(QDJShieldCursorProcPtr)                     QDJShieldCursorUPP;
  348.  
  349. struct QDProcs {
  350.     QDTextUPP                         textProc;
  351.     QDLineUPP                         lineProc;
  352.     QDRectUPP                         rectProc;
  353.     QDRRectUPP                         rRectProc;
  354.     QDOvalUPP                         ovalProc;
  355.     QDArcUPP                         arcProc;
  356.     QDPolyUPP                         polyProc;
  357.     QDRgnUPP                         rgnProc;
  358.     QDBitsUPP                         bitsProc;
  359.     QDCommentUPP                     commentProc;
  360.     QDTxMeasUPP                     txMeasProc;
  361.     QDGetPicUPP                     getPicProc;
  362.     QDPutPicUPP                     putPicProc;
  363. };
  364. typedef struct QDProcs                    QDProcs;
  365. typedef QDProcs *                        QDProcsPtr;
  366. enum { uppQDTextProcInfo = 0x00003F80 };                         /* pascal no_return_value Func(2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  367. enum { uppQDLineProcInfo = 0x000000C0 };                         /* pascal no_return_value Func(4_bytes) */
  368. enum { uppQDRectProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  369. enum { uppQDRRectProcInfo = 0x00002B40 };                         /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
  370. enum { uppQDOvalProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  371. enum { uppQDArcProcInfo = 0x00002B40 };                         /* pascal no_return_value Func(1_byte, 4_bytes, 2_bytes, 2_bytes) */
  372. enum { uppQDPolyProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  373. enum { uppQDRgnProcInfo = 0x00000340 };                         /* pascal no_return_value Func(1_byte, 4_bytes) */
  374. enum { uppQDBitsProcInfo = 0x0000EFC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
  375. enum { uppQDCommentProcInfo = 0x00000E80 };                     /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
  376. enum { uppQDTxMeasProcInfo = 0x0000FFA0 };                         /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  377. enum { uppQDGetPicProcInfo = 0x000002C0 };                         /* pascal no_return_value Func(4_bytes, 2_bytes) */
  378. enum { uppQDPutPicProcInfo = 0x000002C0 };                         /* pascal no_return_value Func(4_bytes, 2_bytes) */
  379. enum { uppQDOpcodeProcInfo = 0x00002BC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 2_bytes) */
  380. enum { uppQDStdGlyphsProcInfo = 0x000003F1 };                     /* 4_bytes Func(4_bytes, 4_bytes) */
  381. enum { uppQDJShieldCursorProcInfo = 0x00002A80 };                 /* pascal no_return_value Func(2_bytes, 2_bytes, 2_bytes, 2_bytes) */
  382. #define NewQDTextProc(userRoutine)                                 (QDTextUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTextProcInfo, GetCurrentArchitecture())
  383. #define NewQDLineProc(userRoutine)                                 (QDLineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDLineProcInfo, GetCurrentArchitecture())
  384. #define NewQDRectProc(userRoutine)                                 (QDRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRectProcInfo, GetCurrentArchitecture())
  385. #define NewQDRRectProc(userRoutine)                             (QDRRectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRRectProcInfo, GetCurrentArchitecture())
  386. #define NewQDOvalProc(userRoutine)                                 (QDOvalUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOvalProcInfo, GetCurrentArchitecture())
  387. #define NewQDArcProc(userRoutine)                                 (QDArcUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDArcProcInfo, GetCurrentArchitecture())
  388. #define NewQDPolyProc(userRoutine)                                 (QDPolyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPolyProcInfo, GetCurrentArchitecture())
  389. #define NewQDRgnProc(userRoutine)                                 (QDRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRgnProcInfo, GetCurrentArchitecture())
  390. #define NewQDBitsProc(userRoutine)                                 (QDBitsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDBitsProcInfo, GetCurrentArchitecture())
  391. #define NewQDCommentProc(userRoutine)                             (QDCommentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDCommentProcInfo, GetCurrentArchitecture())
  392. #define NewQDTxMeasProc(userRoutine)                             (QDTxMeasUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTxMeasProcInfo, GetCurrentArchitecture())
  393. #define NewQDGetPicProc(userRoutine)                             (QDGetPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDGetPicProcInfo, GetCurrentArchitecture())
  394. #define NewQDPutPicProc(userRoutine)                             (QDPutPicUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPutPicProcInfo, GetCurrentArchitecture())
  395. #define NewQDOpcodeProc(userRoutine)                             (QDOpcodeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOpcodeProcInfo, GetCurrentArchitecture())
  396. #define NewQDStdGlyphsProc(userRoutine)                         (QDStdGlyphsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDStdGlyphsProcInfo, GetCurrentArchitecture())
  397. #define NewQDJShieldCursorProc(userRoutine)                     (QDJShieldCursorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDJShieldCursorProcInfo, GetCurrentArchitecture())
  398. #define CallQDTextProc(userRoutine, byteCount, textBuf, numer, denom)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDTextProcInfo, (byteCount), (textBuf), (numer), (denom))
  399. #define CallQDLineProc(userRoutine, newPt)                         CALL_ONE_PARAMETER_UPP((userRoutine), uppQDLineProcInfo, (newPt))
  400. #define CallQDRectProc(userRoutine, verb, r)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDRectProcInfo, (verb), (r))
  401. #define CallQDRRectProc(userRoutine, verb, r, ovalWidth, ovalHeight)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDRRectProcInfo, (verb), (r), (ovalWidth), (ovalHeight))
  402. #define CallQDOvalProc(userRoutine, verb, r)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDOvalProcInfo, (verb), (r))
  403. #define CallQDArcProc(userRoutine, verb, r, startAngle, arcAngle)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDArcProcInfo, (verb), (r), (startAngle), (arcAngle))
  404. #define CallQDPolyProc(userRoutine, verb, poly)                 CALL_TWO_PARAMETER_UPP((userRoutine), uppQDPolyProcInfo, (verb), (poly))
  405. #define CallQDRgnProc(userRoutine, verb, rgn)                     CALL_TWO_PARAMETER_UPP((userRoutine), uppQDRgnProcInfo, (verb), (rgn))
  406. #define CallQDBitsProc(userRoutine, srcBits, srcRect, dstRect, mode, maskRgn)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppQDBitsProcInfo, (srcBits), (srcRect), (dstRect), (mode), (maskRgn))
  407. #define CallQDCommentProc(userRoutine, kind, dataSize, dataHandle)  CALL_THREE_PARAMETER_UPP((userRoutine), uppQDCommentProcInfo, (kind), (dataSize), (dataHandle))
  408. #define CallQDTxMeasProc(userRoutine, byteCount, textAddr, numer, denom, info)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppQDTxMeasProcInfo, (byteCount), (textAddr), (numer), (denom), (info))
  409. #define CallQDGetPicProc(userRoutine, dataPtr, byteCount)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDGetPicProcInfo, (dataPtr), (byteCount))
  410. #define CallQDPutPicProc(userRoutine, dataPtr, byteCount)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDPutPicProcInfo, (dataPtr), (byteCount))
  411. #define CallQDOpcodeProc(userRoutine, fromRect, toRect, opcode, version)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDOpcodeProcInfo, (fromRect), (toRect), (opcode), (version))
  412. #define CallQDStdGlyphsProc(userRoutine, dataStream, size)         CALL_TWO_PARAMETER_UPP((userRoutine), uppQDStdGlyphsProcInfo, (dataStream), (size))
  413. #define CallQDJShieldCursorProc(userRoutine, left, top, right, bottom)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppQDJShieldCursorProcInfo, (left), (top), (right), (bottom))
  414.  
  415.  
  416.  
  417. struct GrafPort {
  418.     short                             device;
  419.     BitMap                             portBits;
  420.     Rect                             portRect;
  421.     RgnHandle                         visRgn;
  422.     RgnHandle                         clipRgn;
  423.     Pattern                         bkPat;
  424.     Pattern                         fillPat;
  425.     Point                             pnLoc;
  426.     Point                             pnSize;
  427.     short                             pnMode;
  428.     Pattern                         pnPat;
  429.     short                             pnVis;
  430.     short                             txFont;
  431.     StyleField                         txFace;                        /*StyleField occupies 16-bits, but only first 8-bits are used*/
  432.     short                             txMode;
  433.     short                             txSize;
  434.     Fixed                             spExtra;
  435.     long                             fgColor;
  436.     long                             bkColor;
  437.     short                             colrBit;
  438.     short                             patStretch;
  439.     Handle                             picSave;
  440.     Handle                             rgnSave;
  441.     Handle                             polySave;
  442.     QDProcsPtr                         grafProcs;
  443. };
  444. typedef struct GrafPort                    GrafPort;
  445.  
  446. typedef GrafPort *                        GrafPtr;
  447.  
  448. /*
  449.  *    This set of definitions "belongs" in Windows.
  450.  *    But, there is a circularity in the headers where Windows includes Controls and
  451.  *    Controls includes Windows. To break the circle, the information
  452.  *    needed by Controls is moved from Windows to Quickdraw.
  453.  */
  454. typedef GrafPtr                         WindowPtr;
  455. typedef WindowPtr                         DialogPtr;
  456. typedef WindowPtr                         WindowRef;
  457. /* DragConstraint constants to pass to DragGray,DragTheRgn, or ConstrainedDragRgn*/
  458. typedef UInt16                             DragConstraint;
  459.  
  460. enum {
  461.     kNoConstraint                = 0,
  462.     kVerticalConstraint            = 1,
  463.     kHorizontalConstraint        = 2
  464. };
  465.  
  466.  
  467. typedef CALLBACK_API( void , DragGrayRgnProcPtr )(void );
  468. /*
  469.  *    Here ends the list of things that "belong" in Windows.
  470.  */
  471.  
  472.  
  473.  
  474. struct RGBColor {
  475.     unsigned short                     red;                        /*magnitude of red component*/
  476.     unsigned short                     green;                        /*magnitude of green component*/
  477.     unsigned short                     blue;                        /*magnitude of blue component*/
  478. };
  479. typedef struct RGBColor                    RGBColor;
  480. typedef RGBColor *                        RGBColorPtr;
  481. typedef RGBColorPtr *                    RGBColorHdl;
  482. typedef CALLBACK_API( Boolean , ColorSearchProcPtr )(RGBColor *rgb, long *position);
  483. typedef CALLBACK_API( Boolean , ColorComplementProcPtr )(RGBColor *rgb);
  484. typedef STACK_UPP_TYPE(DragGrayRgnProcPtr)                         DragGrayRgnUPP;
  485. typedef STACK_UPP_TYPE(ColorSearchProcPtr)                         ColorSearchUPP;
  486. typedef STACK_UPP_TYPE(ColorComplementProcPtr)                     ColorComplementUPP;
  487. enum { uppDragGrayRgnProcInfo = 0x00000000 };                     /* pascal no_return_value Func() */
  488. enum { uppColorSearchProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  489. enum { uppColorComplementProcInfo = 0x000000D0 };                 /* pascal 1_byte Func(4_bytes) */
  490. #define NewDragGrayRgnProc(userRoutine)                         (DragGrayRgnUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragGrayRgnProcInfo, GetCurrentArchitecture())
  491. #define NewColorSearchProc(userRoutine)                         (ColorSearchUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorSearchProcInfo, GetCurrentArchitecture())
  492. #define NewColorComplementProc(userRoutine)                     (ColorComplementUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorComplementProcInfo, GetCurrentArchitecture())
  493. #define CallDragGrayRgnProc(userRoutine)                         CALL_ZERO_PARAMETER_UPP((userRoutine), uppDragGrayRgnProcInfo)
  494. #define CallColorSearchProc(userRoutine, rgb, position)         CALL_TWO_PARAMETER_UPP((userRoutine), uppColorSearchProcInfo, (rgb), (position))
  495. #define CallColorComplementProc(userRoutine, rgb)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppColorComplementProcInfo, (rgb))
  496.  
  497. struct ColorSpec {
  498.     short                             value;                        /*index or other value*/
  499.     RGBColor                         rgb;                        /*true color*/
  500. };
  501. typedef struct ColorSpec                ColorSpec;
  502. typedef ColorSpec *                        ColorSpecPtr;
  503.  
  504. typedef ColorSpec                         CSpecArray[1];
  505.  
  506. struct ColorTable {
  507.     long                             ctSeed;                        /*unique identifier for table*/
  508.     short                             ctFlags;                    /*high bit: 0 = PixMap; 1 = device*/
  509.     short                             ctSize;                        /*number of entries in CTTable*/
  510.     CSpecArray                         ctTable;                    /*array [0..0] of ColorSpec*/
  511. };
  512. typedef struct ColorTable                ColorTable;
  513.  
  514. typedef ColorTable *                    CTabPtr;
  515. typedef CTabPtr *                        CTabHandle;
  516.  
  517. struct xColorSpec {
  518.     short                             value;                        /*index or other value*/
  519.     RGBColor                         rgb;                        /*true color*/
  520.     short                             xalpha;
  521. };
  522. typedef struct xColorSpec                xColorSpec;
  523. typedef xColorSpec *                    xColorSpecPtr;
  524.  
  525. typedef xColorSpec                         xCSpecArray[1];
  526.  
  527. struct MatchRec {
  528.     unsigned short                     red;
  529.     unsigned short                     green;
  530.     unsigned short                     blue;
  531.     long                             matchData;
  532. };
  533. typedef struct MatchRec                    MatchRec;
  534. /*
  535.     QuickTime 3.0 makes PixMap data structure available on non-Mac OS's.
  536.     In order to implement PixMap in these alternate environments, the PixMap
  537.     had to be extended. The pmReserved field was changed to pmExt which is
  538.     a Handle to extra info.  The planeBytes field was changed to pixelFormat.
  539. */
  540. #ifndef OLDPIXMAPSTRUCT
  541. #if TARGET_OS_MAC
  542. #define OLDPIXMAPSTRUCT 1
  543. #else
  544. #define OLDPIXMAPSTRUCT 0
  545. #endif  /* TARGET_OS_MAC */
  546.  
  547. #endif  /*  ! defined(OLDPIXMAPSTRUCT)  */
  548.  
  549.  
  550. #if OLDPIXMAPSTRUCT
  551.     #define GETPIXMAPPIXELFORMAT(pm)        ( (pm)->pixelSize )
  552. #else
  553.     #define GETPIXMAPPIXELFORMAT(pm)        ( ((pm)->pixelFormat != 0) ? (pm)->pixelFormat : (pm)->pixelSize )
  554. #endif
  555.  
  556.  
  557. #if TARGET_OS_MAC || (NeXT && ppc)
  558.     #define NON_MAC_PIXEL_FORMATS   0
  559. #else
  560.     #define NON_MAC_PIXEL_FORMATS   1
  561. #endif
  562.  
  563. /* pixel formats*/
  564.  
  565. enum {
  566.     k1MonochromePixelFormat        = 0x00000001,                    /* 1 bit indexed*/
  567.     k2IndexedPixelFormat        = 0x00000002,                    /* 2 bit indexed*/
  568.     k4IndexedPixelFormat        = 0x00000004,                    /* 4 bit indexed*/
  569.     k8IndexedPixelFormat        = 0x00000008,                    /* 8 bit indexed*/
  570.     k16BE555PixelFormat            = 0x00000010,                    /* 16 bit BE rgb 555 (Mac)*/
  571.     k24RGBPixelFormat            = 0x00000018,                    /* 24 bit rgb */
  572.     k32ARGBPixelFormat            = 0x00000020,                    /* 32 bit argb    (Mac)*/
  573.     k1IndexedGrayPixelFormat    = 0x00000021,                    /* 1 bit indexed gray*/
  574.     k2IndexedGrayPixelFormat    = 0x00000022,                    /* 2 bit indexed gray*/
  575.     k4IndexedGrayPixelFormat    = 0x00000024,                    /* 4 bit indexed gray*/
  576.     k8IndexedGrayPixelFormat    = 0x00000028                    /* 8 bit indexed gray*/
  577. };
  578.  
  579.  
  580. /* values for PixMap.pixelFormat*/
  581.  
  582. enum {
  583.     k16LE555PixelFormat            = FOUR_CHAR_CODE('L555'),        /* 16 bit LE rgb 555 (PC)*/
  584.     k16BE565PixelFormat            = FOUR_CHAR_CODE('B565'),        /* 16 bit BE rgb 565*/
  585.     k16LE565PixelFormat            = FOUR_CHAR_CODE('L565'),        /* 16 bit LE rgb 565*/
  586.     k24BGRPixelFormat            = FOUR_CHAR_CODE('24BG'),        /* 24 bit bgr */
  587.     k32BGRAPixelFormat            = FOUR_CHAR_CODE('BGRA'),        /* 32 bit bgra    (Matrox)*/
  588.     k32ABGRPixelFormat            = FOUR_CHAR_CODE('ABGR'),        /* 32 bit abgr    */
  589.     k32RGBAPixelFormat            = FOUR_CHAR_CODE('RGBA'),        /* 32 bit rgba    */
  590.     kYUVSPixelFormat            = FOUR_CHAR_CODE('yuvs'),        /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
  591.     kYUVUPixelFormat            = FOUR_CHAR_CODE('yuvu'),        /* YUV 4:2:2 byte ordering 16-signed*/
  592.     kYVU9PixelFormat            = FOUR_CHAR_CODE('YVU9'),        /* YVU9 Planar    9*/
  593.     kYUV411PixelFormat            = FOUR_CHAR_CODE('Y411'),        /* YUV 4:1:1 Interleaved    16*/
  594.     kYVYU422PixelFormat            = FOUR_CHAR_CODE('YVYU'),        /* YVYU 4:2:2 byte ordering    16*/
  595.     kUYVY422PixelFormat            = FOUR_CHAR_CODE('UYVY'),        /* UYVY 4:2:2 byte ordering    16*/
  596.     kYUV211PixelFormat            = FOUR_CHAR_CODE('Y211')        /* YUV 2:1:1 Packed    8*/
  597. };
  598.  
  599.  
  600. #if !OLDPIXMAPSTRUCT
  601.  
  602. struct PixMapExtension {
  603.     long                             extSize;                    /*size of struct, duh!*/
  604.     unsigned long                     pmBits;                        /*pixmap attributes bitfield*/
  605.     void *                            pmGD;                        /*this is a GDHandle*/
  606.     long                             pmSeed;
  607.     unsigned long                     reserved0;                    /*reserved for future use*/
  608.     unsigned long                     reserved1;
  609.     unsigned long                     reserved2;
  610. };
  611. typedef struct PixMapExtension            PixMapExtension;
  612.  
  613. typedef PixMapExtension *                PixMapExtPtr;
  614. typedef PixMapExtPtr *                    PixMapExtHandle;
  615. #endif  /*  !OLDPIXMAPSTRUCT */
  616.  
  617.  
  618. struct PixMap {
  619.     Ptr                             baseAddr;                    /*pointer to pixels*/
  620.     short                             rowBytes;                    /*offset to next line*/
  621.     Rect                             bounds;                        /*encloses bitmap*/
  622.     short                             pmVersion;                    /*pixMap version number*/
  623.     short                             packType;                    /*defines packing format*/
  624.     long                             packSize;                    /*length of pixel data*/
  625.     Fixed                             hRes;                        /*horiz. resolution (ppi)*/
  626.     Fixed                             vRes;                        /*vert. resolution (ppi)*/
  627.     short                             pixelType;                    /*defines pixel type*/
  628.     short                             pixelSize;                    /*# bits in pixel*/
  629.     short                             cmpCount;                    /*# components in pixel*/
  630.     short                             cmpSize;                    /*# bits per component*/
  631. #if OLDPIXMAPSTRUCT
  632.     long                             planeBytes;                    /*offset to next plane*/
  633.     CTabHandle                         pmTable;                    /*color map for this pixMap*/
  634.     long                             pmReserved;
  635. #else
  636.     OSType                             pixelFormat;                /*fourCharCode representation*/
  637.     CTabHandle                         pmTable;                    /*color map for this pixMap*/
  638.     PixMapExtHandle                    pmExt;                        /*Handle to pixMap extension*/
  639. #endif
  640. };
  641. typedef struct PixMap                    PixMap;
  642. typedef PixMap *                        PixMapPtr;
  643. typedef PixMapPtr *                        PixMapHandle;
  644.  
  645. struct PixPat {
  646.     short                             patType;                    /*type of pattern*/
  647.     PixMapHandle                     patMap;                        /*the pattern's pixMap*/
  648.     Handle                             patData;                    /*pixmap's data*/
  649.     Handle                             patXData;                    /*expanded Pattern data*/
  650.     short                             patXValid;                    /*flags whether expanded Pattern valid*/
  651.     Handle                             patXMap;                    /*Handle to expanded Pattern data*/
  652.     Pattern                         pat1Data;                    /*old-Style pattern/RGB color*/
  653. };
  654. typedef struct PixPat                    PixPat;
  655. typedef PixPat *                        PixPatPtr;
  656. typedef PixPatPtr *                        PixPatHandle;
  657.  
  658. struct CCrsr {
  659.     short                             crsrType;                    /*type of cursor*/
  660.     PixMapHandle                     crsrMap;                    /*the cursor's pixmap*/
  661.     Handle                             crsrData;                    /*cursor's data*/
  662.     Handle                             crsrXData;                    /*expanded cursor data*/
  663.     short                             crsrXValid;                    /*depth of expanded data (0 if none)*/
  664.     Handle                             crsrXHandle;                /*future use*/
  665.     Bits16                             crsr1Data;                    /*one-bit cursor*/
  666.     Bits16                             crsrMask;                    /*cursor's mask*/
  667.     Point                             crsrHotSpot;                /*cursor's hotspot*/
  668.     long                             crsrXTable;                    /*private*/
  669.     long                             crsrID;                        /*private*/
  670. };
  671. typedef struct CCrsr                    CCrsr;
  672. typedef CCrsr *                            CCrsrPtr;
  673. typedef CCrsrPtr *                        CCrsrHandle;
  674. #if OLDROUTINELOCATIONS
  675.  
  676. struct CIcon {
  677.     PixMap                             iconPMap;                    /*the icon's pixMap*/
  678.     BitMap                             iconMask;                    /*the icon's mask*/
  679.     BitMap                             iconBMap;                    /*the icon's bitMap*/
  680.     Handle                             iconData;                    /*the icon's data*/
  681.     short                             iconMaskData[1];            /*icon's mask and BitMap data*/
  682. };
  683. typedef struct CIcon                    CIcon;
  684. typedef CIcon *                            CIconPtr;
  685. typedef CIconPtr *                        CIconHandle;
  686. #endif  /* OLDROUTINELOCATIONS */
  687.  
  688.  
  689. struct GammaTbl {
  690.     short                             gVersion;                    /*gamma version number*/
  691.     short                             gType;                        /*gamma data type*/
  692.     short                             gFormulaSize;                /*Formula data size*/
  693.     short                             gChanCnt;                    /*number of channels of data*/
  694.     short                             gDataCnt;                    /*number of values/channel*/
  695.     short                             gDataWidth;                    /*bits/corrected value (data packed to next larger byte size)*/
  696.     short                             gFormulaData[1];            /*data for formulas followed by gamma values*/
  697. };
  698. typedef struct GammaTbl                    GammaTbl;
  699. typedef GammaTbl *                        GammaTblPtr;
  700. typedef GammaTblPtr *                    GammaTblHandle;
  701.  
  702. struct ITab {
  703.     long                             iTabSeed;                    /*copy of CTSeed from source CTable*/
  704.     short                             iTabRes;                    /*bits/channel resolution of iTable*/
  705.     Byte                             iTTable[1];                    /*byte colortable index values*/
  706. };
  707. typedef struct ITab                        ITab;
  708. typedef ITab *                            ITabPtr;
  709. typedef ITabPtr *                        ITabHandle;
  710.  
  711. struct SProcRec {
  712.     Handle                             nxtSrch;                    /*SProcHndl Handle to next SProcRec*/
  713.     ColorSearchUPP                     srchProc;                    /*search procedure proc ptr*/
  714. };
  715. typedef struct SProcRec                    SProcRec;
  716.  
  717. typedef SProcRec *                        SProcPtr;
  718. typedef SProcPtr *                        SProcHndl;
  719.  
  720. struct CProcRec {
  721.     Handle                             nxtComp;                    /*CProcHndl Handle to next CProcRec*/
  722.     ColorComplementUPP                 compProc;                    /*complement procedure proc ptr*/
  723. };
  724. typedef struct CProcRec                    CProcRec;
  725.  
  726. typedef CProcRec *                        CProcPtr;
  727. typedef CProcPtr *                        CProcHndl;
  728. /*
  729.     QuickTime 3.0 makes GDevice data structure available on non-Mac OS's.
  730.     In order to implement GDevice in these alternate environments, the GDevice
  731.     had to be extended. The gdReserved field was changed to gdExt which is
  732.     a Handle to extra info.  
  733. */
  734. #ifndef OLDGDEVICESTRUCT
  735. #if TARGET_OS_MAC
  736. #define OLDGDEVICESTRUCT 1
  737. #else
  738. #define OLDGDEVICESTRUCT 0
  739. #endif  /* TARGET_OS_MAC */
  740.  
  741. #endif  /*  ! defined(OLDGDEVICESTRUCT)  */
  742.  
  743.  
  744. struct GDevice {
  745.     short                             gdRefNum;                    /*driver's unit number*/
  746.     short                             gdID;                        /*client ID for search procs*/
  747.     short                             gdType;                        /*fixed/CLUT/direct*/
  748.     ITabHandle                         gdITable;                    /*Handle to inverse lookup table*/
  749.     short                             gdResPref;                    /*preferred resolution of GDITable*/
  750.     SProcHndl                         gdSearchProc;                /*search proc list head*/
  751.     CProcHndl                         gdCompProc;                    /*complement proc list*/
  752.     short                             gdFlags;                    /*grafDevice flags word*/
  753.     PixMapHandle                     gdPMap;                        /*describing pixMap*/
  754.     long                             gdRefCon;                    /*reference value*/
  755.     Handle                             gdNextGD;                    /*GDHandle Handle of next gDevice*/
  756.     Rect                             gdRect;                        /* device's bounds in global coordinates*/
  757.     long                             gdMode;                        /*device's current mode*/
  758.     short                             gdCCBytes;                    /*depth of expanded cursor data*/
  759.     short                             gdCCDepth;                    /*depth of expanded cursor data*/
  760.     Handle                             gdCCXData;                    /*Handle to cursor's expanded data*/
  761.     Handle                             gdCCXMask;                    /*Handle to cursor's expanded mask*/
  762. #if OLDGDEVICESTRUCT
  763.     long                             gdReserved;                    /*future use. MUST BE 0*/
  764. #else
  765.     Handle                             gdExt;                        /*QuickTime 3.0 private info*/
  766. #endif
  767. };
  768. typedef struct GDevice                    GDevice;
  769.  
  770. typedef GDevice *                        GDPtr;
  771. typedef GDPtr *                            GDHandle;
  772.  
  773. struct GrafVars {
  774.     RGBColor                         rgbOpColor;                    /*color for addPin  subPin and average*/
  775.     RGBColor                         rgbHiliteColor;                /*color for hiliting*/
  776.     Handle                             pmFgColor;                    /*palette Handle for foreground color*/
  777.     short                             pmFgIndex;                    /*index value for foreground*/
  778.     Handle                             pmBkColor;                    /*palette Handle for background color*/
  779.     short                             pmBkIndex;                    /*index value for background*/
  780.     short                             pmFlags;                    /*flags for Palette Manager*/
  781. };
  782. typedef struct GrafVars                    GrafVars;
  783.  
  784. typedef GrafVars *                        GVarPtr;
  785. typedef GVarPtr *                        GVarHandle;
  786.  
  787. struct CQDProcs {
  788.     QDTextUPP                         textProc;
  789.     QDLineUPP                         lineProc;
  790.     QDRectUPP                         rectProc;
  791.     QDRRectUPP                         rRectProc;
  792.     QDOvalUPP                         ovalProc;
  793.     QDArcUPP                         arcProc;
  794.     QDPolyUPP                         polyProc;
  795.     QDRgnUPP                         rgnProc;
  796.     QDBitsUPP                         bitsProc;
  797.     QDCommentUPP                     commentProc;
  798.     QDTxMeasUPP                     txMeasProc;
  799.     QDGetPicUPP                     getPicProc;
  800.     QDPutPicUPP                     putPicProc;
  801.     QDOpcodeUPP                     opcodeProc;
  802.     UniversalProcPtr                 newProc1;                    /* this is the StdPix bottleneck -- see ImageCompression.h */
  803.     QDStdGlyphsUPP                     glyphsProc;                    /* was newProc2; now used in Unicode text drawing */
  804.     UniversalProcPtr                 newProc3;
  805.     UniversalProcPtr                 newProc4;
  806.     UniversalProcPtr                 newProc5;
  807.     UniversalProcPtr                 newProc6;
  808. };
  809. typedef struct CQDProcs                    CQDProcs;
  810. typedef CQDProcs *                        CQDProcsPtr;
  811.  
  812. struct CGrafPort {
  813.     short                             device;
  814.     PixMapHandle                     portPixMap;                    /*port's pixel map*/
  815.     short                             portVersion;                /*high 2 bits always set*/
  816.     Handle                             grafVars;                    /*Handle to more fields*/
  817.     short                             chExtra;                    /*character extra*/
  818.     short                             pnLocHFrac;                    /*pen fraction*/
  819.     Rect                             portRect;
  820.     RgnHandle                         visRgn;
  821.     RgnHandle                         clipRgn;
  822.     PixPatHandle                     bkPixPat;                    /*background pattern*/
  823.     RGBColor                         rgbFgColor;                    /*RGB components of fg*/
  824.     RGBColor                         rgbBkColor;                    /*RGB components of bk*/
  825.     Point                             pnLoc;
  826.     Point                             pnSize;
  827.     short                             pnMode;
  828.     PixPatHandle                     pnPixPat;                    /*pen's pattern*/
  829.     PixPatHandle                     fillPixPat;                    /*fill pattern*/
  830.     short                             pnVis;
  831.     short                             txFont;
  832.     StyleField                         txFace;                        /*StyleField occupies 16-bits, but only first 8-bits are used*/
  833.     short                             txMode;
  834.     short                             txSize;
  835.     Fixed                             spExtra;
  836.     long                             fgColor;
  837.     long                             bkColor;
  838.     short                             colrBit;
  839.     short                             patStretch;
  840.     Handle                             picSave;
  841.     Handle                             rgnSave;
  842.     Handle                             polySave;
  843.     CQDProcsPtr                     grafProcs;
  844. };
  845. typedef struct CGrafPort                CGrafPort;
  846.  
  847. typedef CGrafPort *                        CGrafPtr;
  848. typedef CGrafPtr                         CWindowPtr;
  849.  
  850. struct ReqListRec {
  851.     short                             reqLSize;                    /*request list size*/
  852.     short                             reqLData[1];                /*request list data*/
  853. };
  854. typedef struct ReqListRec                ReqListRec;
  855.  
  856. struct OpenCPicParams {
  857.     Rect                             srcRect;
  858.     Fixed                             hRes;
  859.     Fixed                             vRes;
  860.     short                             version;
  861.     short                             reserved1;
  862.     long                             reserved2;
  863. };
  864. typedef struct OpenCPicParams            OpenCPicParams;
  865.  
  866. enum {
  867.     kCursorImageMajorVersion    = 0x0001,
  868.     kCursorImageMinorVersion    = 0x0000
  869. };
  870.  
  871.  
  872. struct CursorImageRec {
  873.     UInt16                             majorVersion;
  874.     UInt16                             minorVersion;
  875.     PixMapHandle                     cursorPixMap;
  876.     BitMapHandle                     cursorBitMask;
  877. };
  878. typedef struct CursorImageRec            CursorImageRec;
  879.  
  880. typedef CursorImageRec *                CursorImagePtr;
  881. typedef CALLBACK_API( void , DeviceLoopDrawingProcPtr )(short depth, short deviceFlags, GDHandle targetDevice, long userData);
  882. typedef STACK_UPP_TYPE(DeviceLoopDrawingProcPtr)                 DeviceLoopDrawingUPP;
  883. enum { uppDeviceLoopDrawingProcInfo = 0x00003E80 };             /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes, 4_bytes) */
  884. #define NewDeviceLoopDrawingProc(userRoutine)                     (DeviceLoopDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeviceLoopDrawingProcInfo, GetCurrentArchitecture())
  885. #define CallDeviceLoopDrawingProc(userRoutine, depth, deviceFlags, targetDevice, userData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDeviceLoopDrawingProcInfo, (depth), (deviceFlags), (targetDevice), (userData))
  886.  
  887. struct QDGlobals {
  888.     char                             privates[76];
  889.     long                             randSeed;
  890.     BitMap                             screenBits;
  891.     Cursor                             arrow;
  892.     Pattern                         dkGray;
  893.     Pattern                         ltGray;
  894.     Pattern                         gray;
  895.     Pattern                         black;
  896.     Pattern                         white;
  897.     GrafPtr                         thePort;
  898. };
  899. typedef struct QDGlobals                QDGlobals;
  900. typedef QDGlobals *                        QDGlobalsPtr;
  901. typedef QDGlobalsPtr *                    QDGlobalsHdl;
  902. extern QDGlobals qd;
  903.  
  904.  
  905.  
  906. EXTERN_API( void )
  907. InitGraf                        (void *                    globalPtr)                            ONEWORDINLINE(0xA86E);
  908.  
  909. EXTERN_API( void )
  910. OpenPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA86F);
  911.  
  912. EXTERN_API( void )
  913. InitPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA86D);
  914.  
  915. EXTERN_API( void )
  916. ClosePort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA87D);
  917.  
  918. #if !TARGET_OS_MAC
  919. EXTERN_API( OSErr )
  920. LockPortBits                    (GrafPtr                 port);
  921.  
  922. EXTERN_API( OSErr )
  923. UnlockPortBits                    (GrafPtr                 port);
  924.  
  925. EXTERN_API( OSErr )
  926. UpdatePort                        (GrafPtr                 port);
  927.  
  928. EXTERN_API( void *)
  929. GetPortNativeWindow                (GrafPtr                 macPort);
  930.  
  931. EXTERN_API( GrafPtr )
  932. GetNativeWindowPort                (void *                    nativeWindow);
  933.  
  934. EXTERN_API( void *)
  935. MacRegionToNativeRegion            (RgnHandle                 macRegion);
  936.  
  937. EXTERN_API( RgnHandle )
  938. NativeRegionToMacRegion            (void *                    nativeRegion);
  939.  
  940. #if TARGET_OS_WIN32
  941. EXTERN_API( void *)
  942. GetPortHWND                        (GrafPtr                 port);
  943.  
  944. EXTERN_API( GrafPtr )
  945. GetHWNDPort                        (void *                    theHWND);
  946.  
  947. #define GetPortHWND(port)  GetPortNativeWindow(port)
  948. #define GetHWNDPort(theHWND) GetNativeWindowPort(theHWND)
  949. EXTERN_API( void *)
  950. GetPortHDC                        (GrafPtr                 port);
  951.  
  952. EXTERN_API( void *)
  953. GetPortHBITMAP                    (GrafPtr                 port);
  954.  
  955. EXTERN_API( void *)
  956. GetPortHPALETTE                    (GrafPtr                 port);
  957.  
  958. EXTERN_API( void *)
  959. GetPortHFONT                    (GrafPtr                 port);
  960.  
  961. EXTERN_API( void *)
  962. GetDIBFromPICT                    (PicHandle                 hPict);
  963.  
  964. EXTERN_API( PicHandle )
  965. GetPICTFromDIB                    (void *                    h);
  966.  
  967. #endif  /* TARGET_OS_WIN32 */
  968.  
  969. #endif  /*  !TARGET_OS_MAC */
  970.  
  971. #if TARGET_OS_MAC
  972.     #define MacSetPort SetPort
  973. #endif
  974. EXTERN_API( void )
  975. MacSetPort                        (GrafPtr                 port)                                ONEWORDINLINE(0xA873);
  976.  
  977. EXTERN_API( void )
  978. GetPort                            (GrafPtr *                port)                                ONEWORDINLINE(0xA874);
  979.  
  980. EXTERN_API( void )
  981. GrafDevice                        (short                     device)                                ONEWORDINLINE(0xA872);
  982.  
  983. EXTERN_API( void )
  984. SetPortBits                        (const BitMap *            bm)                                    ONEWORDINLINE(0xA875);
  985.  
  986. EXTERN_API( void )
  987. PortSize                        (short                     width,
  988.                                  short                     height)                                ONEWORDINLINE(0xA876);
  989.  
  990. EXTERN_API( void )
  991. MovePortTo                        (short                     leftGlobal,
  992.                                  short                     topGlobal)                            ONEWORDINLINE(0xA877);
  993.  
  994. EXTERN_API( void )
  995. SetOrigin                        (short                     h,
  996.                                  short                     v)                                    ONEWORDINLINE(0xA878);
  997.  
  998. EXTERN_API( void )
  999. SetClip                            (RgnHandle                 rgn)                                ONEWORDINLINE(0xA879);
  1000.  
  1001. EXTERN_API( void )
  1002. GetClip                            (RgnHandle                 rgn)                                ONEWORDINLINE(0xA87A);
  1003.  
  1004. EXTERN_API( void )
  1005. ClipRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA87B);
  1006.  
  1007. EXTERN_API( void )
  1008. BackPat                            (const Pattern *        pat)                                ONEWORDINLINE(0xA87C);
  1009.  
  1010. EXTERN_API( void )
  1011. InitCursor                        (void)                                                        ONEWORDINLINE(0xA850);
  1012.  
  1013. #if TARGET_OS_MAC
  1014.     #define MacSetCursor SetCursor
  1015. #endif
  1016. EXTERN_API( void )
  1017. MacSetCursor                    (const Cursor *            crsr)                                ONEWORDINLINE(0xA851);
  1018.  
  1019. EXTERN_API( void )
  1020. HideCursor                        (void)                                                        ONEWORDINLINE(0xA852);
  1021.  
  1022. #if TARGET_OS_MAC
  1023.     #define MacShowCursor ShowCursor
  1024. #endif
  1025. EXTERN_API( void )
  1026. MacShowCursor                    (void)                                                        ONEWORDINLINE(0xA853);
  1027.  
  1028. EXTERN_API( void )
  1029. ObscureCursor                    (void)                                                        ONEWORDINLINE(0xA856);
  1030.  
  1031. EXTERN_API( void )
  1032. HidePen                            (void)                                                        ONEWORDINLINE(0xA896);
  1033.  
  1034. EXTERN_API( void )
  1035. ShowPen                            (void)                                                        ONEWORDINLINE(0xA897);
  1036.  
  1037. EXTERN_API( void )
  1038. GetPen                            (Point *                pt)                                    ONEWORDINLINE(0xA89A);
  1039.  
  1040. EXTERN_API( void )
  1041. GetPenState                        (PenState *                pnState)                            ONEWORDINLINE(0xA898);
  1042.  
  1043. EXTERN_API( void )
  1044. SetPenState                        (const PenState *        pnState)                            ONEWORDINLINE(0xA899);
  1045.  
  1046. EXTERN_API( void )
  1047. PenSize                            (short                     width,
  1048.                                  short                     height)                                ONEWORDINLINE(0xA89B);
  1049.  
  1050. EXTERN_API( void )
  1051. PenMode                            (short                     mode)                                ONEWORDINLINE(0xA89C);
  1052.  
  1053. EXTERN_API( void )
  1054. PenPat                            (const Pattern *        pat)                                ONEWORDINLINE(0xA89D);
  1055.  
  1056. EXTERN_API( void )
  1057. PenNormal                        (void)                                                        ONEWORDINLINE(0xA89E);
  1058.  
  1059. EXTERN_API( void )
  1060. MoveTo                            (short                     h,
  1061.                                  short                     v)                                    ONEWORDINLINE(0xA893);
  1062.  
  1063. EXTERN_API( void )
  1064. Move                            (short                     dh,
  1065.                                  short                     dv)                                    ONEWORDINLINE(0xA894);
  1066.  
  1067. #if TARGET_OS_MAC
  1068.     #define MacLineTo LineTo
  1069. #endif
  1070. EXTERN_API( void )
  1071. MacLineTo                        (short                     h,
  1072.                                  short                     v)                                    ONEWORDINLINE(0xA891);
  1073.  
  1074. EXTERN_API( void )
  1075. Line                            (short                     dh,
  1076.                                  short                     dv)                                    ONEWORDINLINE(0xA892);
  1077.  
  1078. EXTERN_API( void )
  1079. ForeColor                        (long                     color)                                ONEWORDINLINE(0xA862);
  1080.  
  1081. EXTERN_API( void )
  1082. BackColor                        (long                     color)                                ONEWORDINLINE(0xA863);
  1083.  
  1084. EXTERN_API( void )
  1085. ColorBit                        (short                     whichBit)                            ONEWORDINLINE(0xA864);
  1086.  
  1087. #if TARGET_OS_MAC
  1088.     #define MacSetRect SetRect
  1089. #endif
  1090. EXTERN_API( void )
  1091. MacSetRect                        (Rect *                    r,
  1092.                                  short                     left,
  1093.                                  short                     top,
  1094.                                  short                     right,
  1095.                                  short                     bottom)                                ONEWORDINLINE(0xA8A7);
  1096.  
  1097. #if TARGET_OS_MAC
  1098.     #define MacOffsetRect OffsetRect
  1099. #endif
  1100. EXTERN_API( void )
  1101. MacOffsetRect                    (Rect *                    r,
  1102.                                  short                     dh,
  1103.                                  short                     dv)                                    ONEWORDINLINE(0xA8A8);
  1104.  
  1105. #if TARGET_OS_MAC
  1106.     #define MacInsetRect InsetRect
  1107. #endif
  1108. EXTERN_API( void )
  1109. MacInsetRect                    (Rect *                    r,
  1110.                                  short                     dh,
  1111.                                  short                     dv)                                    ONEWORDINLINE(0xA8A9);
  1112.  
  1113. EXTERN_API( Boolean )
  1114. SectRect                        (const Rect *            src1,
  1115.                                  const Rect *            src2,
  1116.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AA);
  1117.  
  1118. #if TARGET_OS_MAC
  1119.     #define MacUnionRect UnionRect
  1120. #endif
  1121. EXTERN_API( void )
  1122. MacUnionRect                    (const Rect *            src1,
  1123.                                  const Rect *            src2,
  1124.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AB);
  1125.  
  1126. #if TARGET_OS_MAC
  1127.     #define MacEqualRect EqualRect
  1128. #endif
  1129. EXTERN_API( Boolean )
  1130. MacEqualRect                    (const Rect *            rect1,
  1131.                                  const Rect *            rect2)                                ONEWORDINLINE(0xA8A6);
  1132.  
  1133. EXTERN_API( Boolean )
  1134. EmptyRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8AE);
  1135.  
  1136. #if TARGET_OS_MAC
  1137.     #define MacFrameRect FrameRect
  1138. #endif
  1139. EXTERN_API( void )
  1140. MacFrameRect                    (const Rect *            r)                                    ONEWORDINLINE(0xA8A1);
  1141.  
  1142. EXTERN_API( void )
  1143. PaintRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A2);
  1144.  
  1145. EXTERN_API( void )
  1146. EraseRect                        (const Rect *            r)                                    ONEWORDINLINE(0xA8A3);
  1147.  
  1148. #if TARGET_OS_MAC
  1149.     #define MacInvertRect InvertRect
  1150. #endif
  1151. EXTERN_API( void )
  1152. MacInvertRect                    (const Rect *            r)                                    ONEWORDINLINE(0xA8A4);
  1153.  
  1154. #if TARGET_OS_MAC
  1155.     #define MacFillRect FillRect
  1156. #endif
  1157. EXTERN_API( void )
  1158. MacFillRect                        (const Rect *            r,
  1159.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8A5);
  1160.  
  1161. EXTERN_API( void )
  1162. FrameOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B7);
  1163.  
  1164. EXTERN_API( void )
  1165. PaintOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B8);
  1166.  
  1167. EXTERN_API( void )
  1168. EraseOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8B9);
  1169.  
  1170. EXTERN_API( void )
  1171. InvertOval                        (const Rect *            r)                                    ONEWORDINLINE(0xA8BA);
  1172.  
  1173. EXTERN_API( void )
  1174. FillOval                        (const Rect *            r,
  1175.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8BB);
  1176.  
  1177. EXTERN_API( void )
  1178. FrameRoundRect                    (const Rect *            r,
  1179.                                  short                     ovalWidth,
  1180.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B0);
  1181.  
  1182. EXTERN_API( void )
  1183. PaintRoundRect                    (const Rect *            r,
  1184.                                  short                     ovalWidth,
  1185.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B1);
  1186.  
  1187. EXTERN_API( void )
  1188. EraseRoundRect                    (const Rect *            r,
  1189.                                  short                     ovalWidth,
  1190.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B2);
  1191.  
  1192. EXTERN_API( void )
  1193. InvertRoundRect                    (const Rect *            r,
  1194.                                  short                     ovalWidth,
  1195.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8B3);
  1196.  
  1197. EXTERN_API( void )
  1198. FillRoundRect                    (const Rect *            r,
  1199.                                  short                     ovalWidth,
  1200.                                  short                     ovalHeight,
  1201.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8B4);
  1202.  
  1203. EXTERN_API( void )
  1204. FrameArc                        (const Rect *            r,
  1205.                                  short                     startAngle,
  1206.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BE);
  1207.  
  1208. EXTERN_API( void )
  1209. PaintArc                        (const Rect *            r,
  1210.                                  short                     startAngle,
  1211.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BF);
  1212.  
  1213. EXTERN_API( void )
  1214. EraseArc                        (const Rect *            r,
  1215.                                  short                     startAngle,
  1216.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8C0);
  1217.  
  1218. EXTERN_API( void )
  1219. InvertArc                        (const Rect *            r,
  1220.                                  short                     startAngle,
  1221.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8C1);
  1222.  
  1223. EXTERN_API( void )
  1224. FillArc                            (const Rect *            r,
  1225.                                  short                     startAngle,
  1226.                                  short                     arcAngle,
  1227.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8C2);
  1228.  
  1229. EXTERN_API( RgnHandle )
  1230. NewRgn                            (void)                                                        ONEWORDINLINE(0xA8D8);
  1231.  
  1232. EXTERN_API( void )
  1233. OpenRgn                            (void)                                                        ONEWORDINLINE(0xA8DA);
  1234.  
  1235. EXTERN_API( void )
  1236. CloseRgn                        (RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8DB);
  1237.  
  1238. EXTERN_API( OSErr )
  1239. BitMapToRegion                    (RgnHandle                 region,
  1240.                                  const BitMap *            bMap)                                ONEWORDINLINE(0xA8D7);
  1241.  
  1242. EXTERN_API( void )
  1243. DisposeRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D9);
  1244.  
  1245. #if TARGET_OS_MAC
  1246.     #define MacCopyRgn CopyRgn
  1247. #endif
  1248. EXTERN_API( void )
  1249. MacCopyRgn                        (RgnHandle                 srcRgn,
  1250.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8DC);
  1251.  
  1252. EXTERN_API( void )
  1253. SetEmptyRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8DD);
  1254.  
  1255. #if TARGET_OS_MAC
  1256.     #define MacSetRectRgn SetRectRgn
  1257. #endif
  1258. EXTERN_API( void )
  1259. MacSetRectRgn                    (RgnHandle                 rgn,
  1260.                                  short                     left,
  1261.                                  short                     top,
  1262.                                  short                     right,
  1263.                                  short                     bottom)                                ONEWORDINLINE(0xA8DE);
  1264.  
  1265. EXTERN_API( void )
  1266. RectRgn                            (RgnHandle                 rgn,
  1267.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8DF);
  1268.  
  1269. #if TARGET_OS_MAC
  1270.     #define MacOffsetRgn OffsetRgn
  1271. #endif
  1272. EXTERN_API( void )
  1273. MacOffsetRgn                    (RgnHandle                 rgn,
  1274.                                  short                     dh,
  1275.                                  short                     dv)                                    ONEWORDINLINE(0xA8E0);
  1276.  
  1277. EXTERN_API( void )
  1278. InsetRgn                        (RgnHandle                 rgn,
  1279.                                  short                     dh,
  1280.                                  short                     dv)                                    ONEWORDINLINE(0xA8E1);
  1281.  
  1282. EXTERN_API( void )
  1283. SectRgn                            (RgnHandle                 srcRgnA,
  1284.                                  RgnHandle                 srcRgnB,
  1285.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E4);
  1286.  
  1287. #if TARGET_OS_MAC
  1288.     #define MacUnionRgn UnionRgn
  1289. #endif
  1290. EXTERN_API( void )
  1291. MacUnionRgn                        (RgnHandle                 srcRgnA,
  1292.                                  RgnHandle                 srcRgnB,
  1293.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E5);
  1294.  
  1295. EXTERN_API( void )
  1296. DiffRgn                            (RgnHandle                 srcRgnA,
  1297.                                  RgnHandle                 srcRgnB,
  1298.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E6);
  1299.  
  1300. #if TARGET_OS_MAC
  1301.     #define MacXorRgn XorRgn
  1302. #endif
  1303. EXTERN_API( void )
  1304. MacXorRgn                        (RgnHandle                 srcRgnA,
  1305.                                  RgnHandle                 srcRgnB,
  1306.                                  RgnHandle                 dstRgn)                                ONEWORDINLINE(0xA8E7);
  1307.  
  1308. EXTERN_API( Boolean )
  1309. RectInRgn                        (const Rect *            r,
  1310.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E9);
  1311.  
  1312. #if TARGET_OS_MAC
  1313.     #define MacEqualRgn EqualRgn
  1314. #endif
  1315. EXTERN_API( Boolean )
  1316. MacEqualRgn                        (RgnHandle                 rgnA,
  1317.                                  RgnHandle                 rgnB)                                ONEWORDINLINE(0xA8E3);
  1318.  
  1319. EXTERN_API( Boolean )
  1320. EmptyRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E2);
  1321.  
  1322. #if TARGET_OS_MAC
  1323.     #define MacFrameRgn FrameRgn
  1324. #endif
  1325. EXTERN_API( void )
  1326. MacFrameRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D2);
  1327.  
  1328. #if TARGET_OS_MAC
  1329.     #define MacPaintRgn PaintRgn
  1330. #endif
  1331. EXTERN_API( void )
  1332. MacPaintRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D3);
  1333.  
  1334. EXTERN_API( void )
  1335. EraseRgn                        (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D4);
  1336.  
  1337. #if TARGET_OS_MAC
  1338.     #define MacInvertRgn InvertRgn
  1339. #endif
  1340. EXTERN_API( void )
  1341. MacInvertRgn                    (RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D5);
  1342.  
  1343. #if TARGET_OS_MAC
  1344.     #define MacFillRgn FillRgn
  1345. #endif
  1346. EXTERN_API( void )
  1347. MacFillRgn                        (RgnHandle                 rgn,
  1348.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8D6);
  1349.  
  1350. EXTERN_API( void )
  1351. ScrollRect                        (const Rect *            r,
  1352.                                  short                     dh,
  1353.                                  short                     dv,
  1354.                                  RgnHandle                 updateRgn)                            ONEWORDINLINE(0xA8EF);
  1355.  
  1356. EXTERN_API( void )
  1357. CopyBits                        (const BitMap *            srcBits,
  1358.                                  const BitMap *            dstBits,
  1359.                                  const Rect *            srcRect,
  1360.                                  const Rect *            dstRect,
  1361.                                  short                     mode,
  1362.                                  RgnHandle                 maskRgn)                            ONEWORDINLINE(0xA8EC);
  1363.  
  1364. EXTERN_API( void )
  1365. SeedFill                        (const void *            srcPtr,
  1366.                                  void *                    dstPtr,
  1367.                                  short                     srcRow,
  1368.                                  short                     dstRow,
  1369.                                  short                     height,
  1370.                                  short                     words,
  1371.                                  short                     seedH,
  1372.                                  short                     seedV)                                ONEWORDINLINE(0xA839);
  1373.  
  1374. EXTERN_API( void )
  1375. CalcMask                        (const void *            srcPtr,
  1376.                                  void *                    dstPtr,
  1377.                                  short                     srcRow,
  1378.                                  short                     dstRow,
  1379.                                  short                     height,
  1380.                                  short                     words)                                ONEWORDINLINE(0xA838);
  1381.  
  1382. EXTERN_API( void )
  1383. CopyMask                        (const BitMap *            srcBits,
  1384.                                  const BitMap *            maskBits,
  1385.                                  const BitMap *            dstBits,
  1386.                                  const Rect *            srcRect,
  1387.                                  const Rect *            maskRect,
  1388.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA817);
  1389.  
  1390. EXTERN_API( PicHandle )
  1391. OpenPicture                        (const Rect *            picFrame)                            ONEWORDINLINE(0xA8F3);
  1392.  
  1393. EXTERN_API( void )
  1394. PicComment                        (short                     kind,
  1395.                                  short                     dataSize,
  1396.                                  Handle                 dataHandle)                            ONEWORDINLINE(0xA8F2);
  1397.  
  1398. EXTERN_API( void )
  1399. ClosePicture                    (void)                                                        ONEWORDINLINE(0xA8F4);
  1400.  
  1401. EXTERN_API( void )
  1402. DrawPicture                        (PicHandle                 myPicture,
  1403.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F6);
  1404.  
  1405. EXTERN_API( void )
  1406. KillPicture                        (PicHandle                 myPicture)                            ONEWORDINLINE(0xA8F5);
  1407.  
  1408. EXTERN_API( PolyHandle )
  1409. OpenPoly                        (void)                                                        ONEWORDINLINE(0xA8CB);
  1410.  
  1411. EXTERN_API( void )
  1412. ClosePoly                        (void)                                                        ONEWORDINLINE(0xA8CC);
  1413.  
  1414. EXTERN_API( void )
  1415. KillPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8CD);
  1416.  
  1417. EXTERN_API( void )
  1418. OffsetPoly                        (PolyHandle             poly,
  1419.                                  short                     dh,
  1420.                                  short                     dv)                                    ONEWORDINLINE(0xA8CE);
  1421.  
  1422. EXTERN_API( void )
  1423. FramePoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C6);
  1424.  
  1425. EXTERN_API( void )
  1426. PaintPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C7);
  1427.  
  1428. EXTERN_API( void )
  1429. ErasePoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C8);
  1430.  
  1431. EXTERN_API( void )
  1432. InvertPoly                        (PolyHandle             poly)                                ONEWORDINLINE(0xA8C9);
  1433.  
  1434. EXTERN_API( void )
  1435. FillPoly                        (PolyHandle             poly,
  1436.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8CA);
  1437.  
  1438. EXTERN_API( void )
  1439. SetPt                            (Point *                pt,
  1440.                                  short                     h,
  1441.                                  short                     v)                                    ONEWORDINLINE(0xA880);
  1442.  
  1443. EXTERN_API( void )
  1444. LocalToGlobal                    (Point *                pt)                                    ONEWORDINLINE(0xA870);
  1445.  
  1446. EXTERN_API( void )
  1447. GlobalToLocal                    (Point *                pt)                                    ONEWORDINLINE(0xA871);
  1448.  
  1449. EXTERN_API( short )
  1450. Random                            (void)                                                        ONEWORDINLINE(0xA861);
  1451.  
  1452. EXTERN_API( void )
  1453. StuffHex                        (void *                    thingPtr,
  1454.                                  ConstStr255Param         s)                                    ONEWORDINLINE(0xA866);
  1455.  
  1456. #if TARGET_OS_MAC
  1457.     #define MacGetPixel GetPixel
  1458. #endif
  1459. EXTERN_API( Boolean )
  1460. MacGetPixel                        (short                     h,
  1461.                                  short                     v)                                    ONEWORDINLINE(0xA865);
  1462.  
  1463. EXTERN_API( void )
  1464. ScalePt                            (Point *                pt,
  1465.                                  const Rect *            srcRect,
  1466.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F8);
  1467.  
  1468. EXTERN_API( void )
  1469. MapPt                            (Point *                pt,
  1470.                                  const Rect *            srcRect,
  1471.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8F9);
  1472.  
  1473. EXTERN_API( void )
  1474. MapRect                            (Rect *                    r,
  1475.                                  const Rect *            srcRect,
  1476.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FA);
  1477.  
  1478. EXTERN_API( void )
  1479. MapRgn                            (RgnHandle                 rgn,
  1480.                                  const Rect *            srcRect,
  1481.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FB);
  1482.  
  1483. EXTERN_API( void )
  1484. MapPoly                            (PolyHandle             poly,
  1485.                                  const Rect *            srcRect,
  1486.                                  const Rect *            dstRect)                            ONEWORDINLINE(0xA8FC);
  1487.  
  1488. EXTERN_API( void )
  1489. SetStdProcs                        (QDProcs *                procs)                                ONEWORDINLINE(0xA8EA);
  1490.  
  1491. EXTERN_API( void )
  1492. StdRect                            (GrafVerb                 verb,
  1493.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8A0);
  1494.  
  1495. EXTERN_API( void )
  1496. StdRRect                        (GrafVerb                 verb,
  1497.                                  const Rect *            r,
  1498.                                  short                     ovalWidth,
  1499.                                  short                     ovalHeight)                            ONEWORDINLINE(0xA8AF);
  1500.  
  1501. EXTERN_API( void )
  1502. StdOval                            (GrafVerb                 verb,
  1503.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8B6);
  1504.  
  1505. EXTERN_API( void )
  1506. StdArc                            (GrafVerb                 verb,
  1507.                                  const Rect *            r,
  1508.                                  short                     startAngle,
  1509.                                  short                     arcAngle)                            ONEWORDINLINE(0xA8BD);
  1510.  
  1511. EXTERN_API( void )
  1512. StdPoly                            (GrafVerb                 verb,
  1513.                                  PolyHandle             poly)                                ONEWORDINLINE(0xA8C5);
  1514.  
  1515. EXTERN_API( void )
  1516. StdRgn                            (GrafVerb                 verb,
  1517.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8D1);
  1518.  
  1519. EXTERN_API( void )
  1520. StdBits                            (const BitMap *            srcBits,
  1521.                                  const Rect *            srcRect,
  1522.                                  const Rect *            dstRect,
  1523.                                  short                     mode,
  1524.                                  RgnHandle                 maskRgn)                            ONEWORDINLINE(0xA8EB);
  1525.  
  1526. EXTERN_API( void )
  1527. StdComment                        (short                     kind,
  1528.                                  short                     dataSize,
  1529.                                  Handle                 dataHandle)                            ONEWORDINLINE(0xA8F1);
  1530.  
  1531. EXTERN_API( void )
  1532. StdGetPic                        (void *                    dataPtr,
  1533.                                  short                     byteCount)                            ONEWORDINLINE(0xA8EE);
  1534.  
  1535. EXTERN_API( void )
  1536. StdPutPic                        (const void *            dataPtr,
  1537.                                  short                     byteCount)                            ONEWORDINLINE(0xA8F0);
  1538.  
  1539. EXTERN_API( void )
  1540. StdOpcode                        (const Rect *            fromRect,
  1541.                                  const Rect *            toRect,
  1542.                                  UInt16                 opcode,
  1543.                                  SInt16                 version)                            ONEWORDINLINE(0xABF8);
  1544.  
  1545. EXTERN_API( void )
  1546. AddPt                            (Point                     src,
  1547.                                  Point *                dst)                                ONEWORDINLINE(0xA87E);
  1548.  
  1549. EXTERN_API( Boolean )
  1550. EqualPt                            (Point                     pt1,
  1551.                                  Point                     pt2)                                ONEWORDINLINE(0xA881);
  1552.  
  1553. #if TARGET_OS_MAC
  1554.     #define MacPtInRect PtInRect
  1555. #endif
  1556. EXTERN_API( Boolean )
  1557. MacPtInRect                        (Point                     pt,
  1558.                                  const Rect *            r)                                    ONEWORDINLINE(0xA8AD);
  1559.  
  1560. EXTERN_API( void )
  1561. Pt2Rect                            (Point                     pt1,
  1562.                                  Point                     pt2,
  1563.                                  Rect *                    dstRect)                            ONEWORDINLINE(0xA8AC);
  1564.  
  1565. EXTERN_API( void )
  1566. PtToAngle                        (const Rect *            r,
  1567.                                  Point                     pt,
  1568.                                  short *                angle)                                ONEWORDINLINE(0xA8C3);
  1569.  
  1570. EXTERN_API( void )
  1571. SubPt                            (Point                     src,
  1572.                                  Point *                dst)                                ONEWORDINLINE(0xA87F);
  1573.  
  1574. EXTERN_API( Boolean )
  1575. PtInRgn                            (Point                     pt,
  1576.                                  RgnHandle                 rgn)                                ONEWORDINLINE(0xA8E8);
  1577.  
  1578. EXTERN_API( void )
  1579. StdLine                            (Point                     newPt)                                ONEWORDINLINE(0xA890);
  1580.  
  1581. EXTERN_API( void )
  1582. OpenCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA00);
  1583.  
  1584. EXTERN_API( void )
  1585. InitCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA01);
  1586.  
  1587. EXTERN_API( void )
  1588. CloseCPort                        (CGrafPtr                 port)                                ONEWORDINLINE(0xAA02);
  1589.  
  1590. EXTERN_API( PixMapHandle )
  1591. NewPixMap                        (void)                                                        ONEWORDINLINE(0xAA03);
  1592.  
  1593. EXTERN_API( void )
  1594. DisposePixMap                    (PixMapHandle             pm)                                    ONEWORDINLINE(0xAA04);
  1595.  
  1596. EXTERN_API( void )
  1597. CopyPixMap                        (PixMapHandle             srcPM,
  1598.                                  PixMapHandle             dstPM)                                ONEWORDINLINE(0xAA05);
  1599.  
  1600. EXTERN_API( PixPatHandle )
  1601. NewPixPat                        (void)                                                        ONEWORDINLINE(0xAA07);
  1602.  
  1603. EXTERN_API( void )
  1604. DisposePixPat                    (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA08);
  1605.  
  1606. EXTERN_API( void )
  1607. CopyPixPat                        (PixPatHandle             srcPP,
  1608.                                  PixPatHandle             dstPP)                                ONEWORDINLINE(0xAA09);
  1609.  
  1610. EXTERN_API( void )
  1611. PenPixPat                        (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0A);
  1612.  
  1613. EXTERN_API( void )
  1614. BackPixPat                        (PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0B);
  1615.  
  1616. EXTERN_API( PixPatHandle )
  1617. GetPixPat                        (short                     patID)                                ONEWORDINLINE(0xAA0C);
  1618.  
  1619. EXTERN_API( void )
  1620. MakeRGBPat                        (PixPatHandle             pp,
  1621.                                  const RGBColor *        myColor)                            ONEWORDINLINE(0xAA0D);
  1622.  
  1623. EXTERN_API( void )
  1624. FillCRect                        (const Rect *            r,
  1625.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0E);
  1626.  
  1627. EXTERN_API( void )
  1628. FillCOval                        (const Rect *            r,
  1629.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA0F);
  1630.  
  1631. EXTERN_API( void )
  1632. FillCRoundRect                    (const Rect *            r,
  1633.                                  short                     ovalWidth,
  1634.                                  short                     ovalHeight,
  1635.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA10);
  1636.  
  1637. EXTERN_API( void )
  1638. FillCArc                        (const Rect *            r,
  1639.                                  short                     startAngle,
  1640.                                  short                     arcAngle,
  1641.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA11);
  1642.  
  1643. EXTERN_API( void )
  1644. FillCRgn                        (RgnHandle                 rgn,
  1645.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA12);
  1646.  
  1647. EXTERN_API( void )
  1648. FillCPoly                        (PolyHandle             poly,
  1649.                                  PixPatHandle             pp)                                    ONEWORDINLINE(0xAA13);
  1650.  
  1651. EXTERN_API( void )
  1652. RGBForeColor                    (const RGBColor *        color)                                ONEWORDINLINE(0xAA14);
  1653.  
  1654. EXTERN_API( void )
  1655. RGBBackColor                    (const RGBColor *        color)                                ONEWORDINLINE(0xAA15);
  1656.  
  1657. EXTERN_API( void )
  1658. SetCPixel                        (short                     h,
  1659.                                  short                     v,
  1660.                                  const RGBColor *        cPix)                                ONEWORDINLINE(0xAA16);
  1661.  
  1662. EXTERN_API( void )
  1663. SetPortPix                        (PixMapHandle             pm)                                    ONEWORDINLINE(0xAA06);
  1664.  
  1665. EXTERN_API( void )
  1666. GetCPixel                        (short                     h,
  1667.                                  short                     v,
  1668.                                  RGBColor *                cPix)                                ONEWORDINLINE(0xAA17);
  1669.  
  1670. EXTERN_API( void )
  1671. GetForeColor                    (RGBColor *                color)                                ONEWORDINLINE(0xAA19);
  1672.  
  1673. EXTERN_API( void )
  1674. GetBackColor                    (RGBColor *                color)                                ONEWORDINLINE(0xAA1A);
  1675.  
  1676. EXTERN_API( void )
  1677. SeedCFill                        (const BitMap *            srcBits,
  1678.                                  const BitMap *            dstBits,
  1679.                                  const Rect *            srcRect,
  1680.                                  const Rect *            dstRect,
  1681.                                  short                     seedH,
  1682.                                  short                     seedV,
  1683.                                  ColorSearchUPP         matchProc,
  1684.                                  long                     matchData)                            ONEWORDINLINE(0xAA50);
  1685.  
  1686. EXTERN_API( void )
  1687. CalcCMask                        (const BitMap *            srcBits,
  1688.                                  const BitMap *            dstBits,
  1689.                                  const Rect *            srcRect,
  1690.                                  const Rect *            dstRect,
  1691.                                  const RGBColor *        seedRGB,
  1692.                                  ColorSearchUPP         matchProc,
  1693.                                  long                     matchData)                            ONEWORDINLINE(0xAA4F);
  1694.  
  1695. EXTERN_API( PicHandle )
  1696. OpenCPicture                    (const OpenCPicParams *    newHeader)                            ONEWORDINLINE(0xAA20);
  1697.  
  1698. EXTERN_API( void )
  1699. OpColor                            (const RGBColor *        color)                                ONEWORDINLINE(0xAA21);
  1700.  
  1701. EXTERN_API( void )
  1702. HiliteColor                        (const RGBColor *        color)                                ONEWORDINLINE(0xAA22);
  1703.  
  1704. EXTERN_API( void )
  1705. DisposeCTable                    (CTabHandle             cTable)                                ONEWORDINLINE(0xAA24);
  1706.  
  1707. EXTERN_API( CTabHandle )
  1708. GetCTable                        (short                     ctID)                                ONEWORDINLINE(0xAA18);
  1709.  
  1710. EXTERN_API( CCrsrHandle )
  1711. GetCCursor                        (short                     crsrID)                                ONEWORDINLINE(0xAA1B);
  1712.  
  1713. EXTERN_API( void )
  1714. SetCCursor                        (CCrsrHandle             cCrsr)                                ONEWORDINLINE(0xAA1C);
  1715.  
  1716. EXTERN_API( void )
  1717. AllocCursor                        (void)                                                        ONEWORDINLINE(0xAA1D);
  1718.  
  1719. EXTERN_API( void )
  1720. DisposeCCursor                    (CCrsrHandle             cCrsr)                                ONEWORDINLINE(0xAA26);
  1721.  
  1722. #if OLDROUTINELOCATIONS
  1723. EXTERN_API( CIconHandle )
  1724. GetCIcon                        (short                     iconID)                                ONEWORDINLINE(0xAA1E);
  1725.  
  1726. EXTERN_API( void )
  1727. PlotCIcon                        (const Rect *            theRect,
  1728.                                  CIconHandle             theIcon)                            ONEWORDINLINE(0xAA1F);
  1729.  
  1730. EXTERN_API( void )
  1731. DisposeCIcon                    (CIconHandle             theIcon)                            ONEWORDINLINE(0xAA25);
  1732.  
  1733. #endif  /* OLDROUTINELOCATIONS */
  1734.  
  1735. EXTERN_API( void )
  1736. SetStdCProcs                    (CQDProcs *                procs)                                ONEWORDINLINE(0xAA4E);
  1737.  
  1738. EXTERN_API( GDHandle )
  1739. GetMaxDevice                    (const Rect *            globalRect)                            ONEWORDINLINE(0xAA27);
  1740.  
  1741. EXTERN_API( long )
  1742. GetCTSeed                        (void)                                                        ONEWORDINLINE(0xAA28);
  1743.  
  1744. EXTERN_API( GDHandle )
  1745. GetDeviceList                    (void)                                                        ONEWORDINLINE(0xAA29);
  1746.  
  1747. EXTERN_API( GDHandle )
  1748. GetMainDevice                    (void)                                                        ONEWORDINLINE(0xAA2A);
  1749.  
  1750. EXTERN_API( GDHandle )
  1751. GetNextDevice                    (GDHandle                 curDevice)                            ONEWORDINLINE(0xAA2B);
  1752.  
  1753. EXTERN_API( Boolean )
  1754. TestDeviceAttribute                (GDHandle                 gdh,
  1755.                                  short                     attribute)                            ONEWORDINLINE(0xAA2C);
  1756.  
  1757. EXTERN_API( void )
  1758. SetDeviceAttribute                (GDHandle                 gdh,
  1759.                                  short                     attribute,
  1760.                                  Boolean                 value)                                ONEWORDINLINE(0xAA2D);
  1761.  
  1762. EXTERN_API( void )
  1763. InitGDevice                        (short                     qdRefNum,
  1764.                                  long                     mode,
  1765.                                  GDHandle                 gdh)                                ONEWORDINLINE(0xAA2E);
  1766.  
  1767. EXTERN_API( GDHandle )
  1768. NewGDevice                        (short                     refNum,
  1769.                                  long                     mode)                                ONEWORDINLINE(0xAA2F);
  1770.  
  1771. EXTERN_API( void )
  1772. DisposeGDevice                    (GDHandle                 gdh)                                ONEWORDINLINE(0xAA30);
  1773.  
  1774. EXTERN_API( void )
  1775. SetGDevice                        (GDHandle                 gd)                                    ONEWORDINLINE(0xAA31);
  1776.  
  1777. EXTERN_API( GDHandle )
  1778. GetGDevice                        (void)                                                        ONEWORDINLINE(0xAA32);
  1779.  
  1780. EXTERN_API( long )
  1781. Color2Index                        (const RGBColor *        myColor)                            ONEWORDINLINE(0xAA33);
  1782.  
  1783. EXTERN_API( void )
  1784. Index2Color                        (long                     index,
  1785.                                  RGBColor *                aColor)                                ONEWORDINLINE(0xAA34);
  1786.  
  1787. EXTERN_API( void )
  1788. InvertColor                        (RGBColor *                myColor)                            ONEWORDINLINE(0xAA35);
  1789.  
  1790. EXTERN_API( Boolean )
  1791. RealColor                        (const RGBColor *        color)                                ONEWORDINLINE(0xAA36);
  1792.  
  1793. EXTERN_API( void )
  1794. GetSubTable                        (CTabHandle             myColors,
  1795.                                  short                     iTabRes,
  1796.                                  CTabHandle             targetTbl)                            ONEWORDINLINE(0xAA37);
  1797.  
  1798. EXTERN_API( void )
  1799. MakeITable                        (CTabHandle             cTabH,
  1800.                                  ITabHandle             iTabH,
  1801.                                  short                     res)                                ONEWORDINLINE(0xAA39);
  1802.  
  1803. EXTERN_API( void )
  1804. AddSearch                        (ColorSearchUPP         searchProc)                            ONEWORDINLINE(0xAA3A);
  1805.  
  1806. EXTERN_API( void )
  1807. AddComp                            (ColorComplementUPP     compProc)                            ONEWORDINLINE(0xAA3B);
  1808.  
  1809. EXTERN_API( void )
  1810. DelSearch                        (ColorSearchUPP         searchProc)                            ONEWORDINLINE(0xAA4C);
  1811.  
  1812. EXTERN_API( void )
  1813. DelComp                            (ColorComplementUPP     compProc)                            ONEWORDINLINE(0xAA4D);
  1814.  
  1815. EXTERN_API( void )
  1816. SetClientID                        (short                     id)                                    ONEWORDINLINE(0xAA3C);
  1817.  
  1818. EXTERN_API( void )
  1819. ProtectEntry                    (short                     index,
  1820.                                  Boolean                 protect)                            ONEWORDINLINE(0xAA3D);
  1821.  
  1822. EXTERN_API( void )
  1823. ReserveEntry                    (short                     index,
  1824.                                  Boolean                 reserve)                            ONEWORDINLINE(0xAA3E);
  1825.  
  1826. EXTERN_API( void )
  1827. SetEntries                        (short                     start,
  1828.                                  short                     count,
  1829.                                  CSpecArray             aTable)                                ONEWORDINLINE(0xAA3F);
  1830.  
  1831. EXTERN_API( void )
  1832. SaveEntries                        (CTabHandle             srcTable,
  1833.                                  CTabHandle             resultTable,
  1834.                                  ReqListRec *            selection)                            ONEWORDINLINE(0xAA49);
  1835.  
  1836. EXTERN_API( void )
  1837. RestoreEntries                    (CTabHandle             srcTable,
  1838.                                  CTabHandle             dstTable,
  1839.                                  ReqListRec *            selection)                            ONEWORDINLINE(0xAA4A);
  1840.  
  1841. EXTERN_API( short )
  1842. QDError                            (void)                                                        ONEWORDINLINE(0xAA40);
  1843.  
  1844. EXTERN_API( void )
  1845. CopyDeepMask                    (const BitMap *            srcBits,
  1846.                                  const BitMap *            maskBits,
  1847.                                  const BitMap *            dstBits,
  1848.                                  const Rect *            srcRect,
  1849.                                  const Rect *            maskRect,
  1850.                                  const Rect *            dstRect,
  1851.                                  short                     mode,
  1852.                                  RgnHandle                 maskRgn)                            ONEWORDINLINE(0xAA51);
  1853.  
  1854. EXTERN_API( void )
  1855. DeviceLoop                        (RgnHandle                 drawingRgn,
  1856.                                  DeviceLoopDrawingUPP     drawingProc,
  1857.                                  long                     userData,
  1858.                                  DeviceLoopFlags         flags)                                ONEWORDINLINE(0xABCA);
  1859.  
  1860.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1861.                                                                                             #pragma parameter __A0 GetMaskTable
  1862.                                                                                             #endif
  1863. EXTERN_API( Ptr )
  1864. GetMaskTable                    (void)                                                        ONEWORDINLINE(0xA836);
  1865.  
  1866. EXTERN_API( PatHandle )
  1867. GetPattern                        (short                     patternID)                            ONEWORDINLINE(0xA9B8);
  1868.  
  1869. #if TARGET_OS_MAC
  1870.     #define MacGetCursor GetCursor
  1871. #endif
  1872. EXTERN_API( CursHandle )
  1873. MacGetCursor                    (short                     cursorID)                            ONEWORDINLINE(0xA9B9);
  1874.  
  1875. EXTERN_API( PicHandle )
  1876. GetPicture                        (short                     pictureID)                            ONEWORDINLINE(0xA9BC);
  1877.  
  1878. EXTERN_API( long )
  1879. DeltaPoint                        (Point                     ptA,
  1880.                                  Point                     ptB)                                ONEWORDINLINE(0xA94F);
  1881.  
  1882. EXTERN_API( void )
  1883. ShieldCursor                    (const Rect *            shieldRect,
  1884.                                  Point                     offsetPt)                            ONEWORDINLINE(0xA855);
  1885.  
  1886. EXTERN_API( void )
  1887. ScreenRes                        (short *                scrnHRes,
  1888.                                  short *                scrnVRes)                            SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
  1889.  
  1890. EXTERN_API( void )
  1891. GetIndPattern                    (Pattern *                thePat,
  1892.                                  short                     patternListID,
  1893.                                  short                     index);
  1894.  
  1895. #if CGLUESUPPORTED
  1896. EXTERN_API_C( Boolean )
  1897. ptinrect                        (const Point *            pt,
  1898.                                  const Rect *            r);
  1899.  
  1900. EXTERN_API_C( void )
  1901. pt2rect                            (const Point *            pt1,
  1902.                                  const Point *            pt2,
  1903.                                  Rect *                    destRect);
  1904.  
  1905. EXTERN_API_C( void )
  1906. pttoangle                        (const Rect *            r,
  1907.                                  const Point *            pt,
  1908.                                  short *                angle);
  1909.  
  1910. EXTERN_API_C( Boolean )
  1911. ptinrgn                            (const Point *            pt,
  1912.                                  RgnHandle                 rgn);
  1913.  
  1914. EXTERN_API_C( void )
  1915. addpt                            (const Point *            src,
  1916.                                  Point *                dst);
  1917.  
  1918. EXTERN_API_C( void )
  1919. subpt                            (const Point *            src,
  1920.                                  Point *                dst);
  1921.  
  1922. EXTERN_API_C( Boolean )
  1923. equalpt                            (const Point *            pt1,
  1924.                                  const Point *            pt2);
  1925.  
  1926. EXTERN_API_C( void )
  1927. stuffhex                        (void *                    thingPtr,
  1928.                                  const char *            s);
  1929.  
  1930. EXTERN_API_C( void )
  1931. stdline                            (const Point *            newPt);
  1932.  
  1933. EXTERN_API_C( void )
  1934. shieldcursor                    (const Rect *            shieldRect,
  1935.                                  Point *                offsetPt);
  1936.  
  1937. EXTERN_API_C( long )
  1938. deltapoint                        (Point *                ptA,
  1939.                                  Point *                ptB);
  1940.  
  1941. #endif  /* CGLUESUPPORTED */
  1942.  
  1943. #if OLDROUTINENAMES
  1944. #define DisposPixMap(pm) DisposePixMap(pm)
  1945. #define DisposPixPat(pp) DisposePixPat(pp)
  1946. #define DisposCTable(cTable) DisposeCTable(cTable)
  1947. #define DisposCCursor(cCrsr) DisposeCCursor(cCrsr)
  1948. #if OLDROUTINELOCATIONS
  1949. #define DisposCIcon(theIcon) DisposeCIcon(theIcon)
  1950. #endif  /* OLDROUTINELOCATIONS */
  1951.  
  1952. #define DisposGDevice(gdh) DisposeGDevice(gdh)
  1953. #endif  /* OLDROUTINENAMES */
  1954.  
  1955. /*
  1956.     From ToolUtils.i
  1957. */
  1958. EXTERN_API( void )
  1959. PackBits                        (Ptr *                    srcPtr,
  1960.                                  Ptr *                    dstPtr,
  1961.                                  short                     srcBytes)                            ONEWORDINLINE(0xA8CF);
  1962.  
  1963. EXTERN_API( void )
  1964. UnpackBits                        (Ptr *                    srcPtr,
  1965.                                  Ptr *                    dstPtr,
  1966.                                  short                     dstBytes)                            ONEWORDINLINE(0xA8D0);
  1967.  
  1968. EXTERN_API( Fixed )
  1969. SlopeFromAngle                    (short                     angle)                                ONEWORDINLINE(0xA8BC);
  1970.  
  1971. EXTERN_API( short )
  1972. AngleFromSlope                    (Fixed                     slope)                                ONEWORDINLINE(0xA8C4);
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986. #if PRAGMA_STRUCT_ALIGN
  1987.     #pragma options align=reset
  1988. #elif PRAGMA_STRUCT_PACKPUSH
  1989.     #pragma pack(pop)
  1990. #elif PRAGMA_STRUCT_PACK
  1991.     #pragma pack()
  1992. #endif
  1993.  
  1994. #ifdef PRAGMA_IMPORT_OFF
  1995. #pragma import off
  1996. #elif PRAGMA_IMPORT
  1997. #pragma import reset
  1998. #endif
  1999.  
  2000. #ifdef __cplusplus
  2001. }
  2002. #endif
  2003.  
  2004. #endif /* __QUICKDRAW__ */
  2005.  
  2006.